﻿@model models.Logo

@{
    ViewBag.Title = "Rate";
}

<h2>Rate</h2>
<font color="red">@TempData["Message"]</font>
@using (Ajax.BeginForm("Rate", new AjaxOptions() { UpdateTargetId = "New", InsertionMode = InsertionMode.Replace, OnSuccess = "displayMessage" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    @Html.Partial("QuickRate", Model)
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <script>
        function voteClick(value) {
            $('#Weight').attr('value', value);
            $('#form0').submit();
        }

        function displayMessage() {
            toastr.info($('#message').val());
        } // declare a variable one to be a function.

    </script>
}
